package com.hiwhitley.easy.day09;

import java.util.Arrays;

/**
 * Created by hiwhitley on 2016/8/13.
 */
public class ContainsDuplicate {
    public boolean containsDuplicate(int[] nums){
        Arrays.sort(nums);
        for (int i = 0; i < nums.length - 1; i++) {
            if (nums[i] == nums[i + 1])
                return true;
        }
        return false;
    }
}
